package com.fuqizai.account.controller;

import com.fuqizai.account.entity.HrPersonInfo;
import com.fuqizai.account.mapper.HrPersonInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("hello")
public class HelloController {
    @GetMapping
    public String Hell0 () {

        return "Hello Wolrd!!!";
    }

    @Autowired
    private HrPersonInfoMapper hrPersonInfoMapper;

    @GetMapping("getHrPersonInfo")
    public void getHrPersonInfo () {

        //查询全部用户
        //参数是一个Wrapper，条件构造器，这里先不用定为null
        List<HrPersonInfo> hrPersonInfoList = hrPersonInfoMapper.selectList(null);
        for (HrPersonInfo hrPersonInfo : hrPersonInfoList) {
            System.out.println(hrPersonInfo);
        }
    }
}
